package com.niit.az;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

public class Personal extends AppCompatActivity {
    private Button choice;
    private ImageView picture;
    String position;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_personal);

        choice = (Button)findViewById(R.id.choice);
        picture = findViewById(R.id.picture);

        choice.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Personal.this,Avator.class);
                startActivity(intent);
            }
        });

        position = getIntent().getStringExtra("position");
        //int positionid = Integer.parseInt(position);
        System.out.println(position+"哈哈哈哈");
        if ("10".equals(position)){
            picture.setImageResource(R.drawable.avatar2);
        }
        if ("20".equals(position)){
            picture.setImageResource(R.drawable.avatar3);
        }
        if ("30".equals(position)){
            picture.setImageResource(R.drawable.avatar4);
        }
        if ("40".equals(position)){
            picture.setImageResource(R.drawable.avatar5);
        }
        if ("50".equals(position)){
            picture.setImageResource(R.drawable.avatar6);
        }
        if ("60".equals(position)){
            picture.setImageResource(R.drawable.avatar7);
        }
        if ("70".equals(position)){
            picture.setImageResource(R.drawable.avatar8);
        }
        if ("80".equals(position)){
            picture.setImageResource(R.drawable.avatar9);
        }
        if ("90".equals(position)){
            picture.setImageResource(R.drawable.avatar10);
        }

    }
}
